<div class="notice_empty" style="text-align: center; line-height: 50px;">当前没有任何消息！</div>
<div class="notice_subject" style="text-align: center; font-size: 16px; padding: 5px; border-bottom: 1px solid #b3b3b3; color: #000;">
</div>
<div class="notice_time" style="text-align: center; line-height: 26px; font-size: 14px;">
</div>

<div class="notice_content" style="font-size: 14px; padding: 10px;">
</div>

<div style="margin: 15px;">
    <button type="button" class="am-btn am-btn-primary notice_btn-next common_button">下一条</button>
</div>

<script>
    $(".notice_empty").hide();

    var noticeList = [];
    var currNoticeIndex = 0;
    CMD.notice_uquery(undefined, undefined, 20, 1, function(r) {
        noticeList = r.list;
        if (noticeList.length == 0) {
            $(".notice_empty").show();
            return;
        }

        drawNotice();
        $(".notice_btn-next").click(function() {
            currNoticeIndex++;
            drawNotice();
        })
    });

    function drawNotice() {
        var d = noticeList[currNoticeIndex];
        $(".notice_subject").html(d.subject);
        $(".notice_time").html(d.time);
        $(".notice_content").html(d.content);

        if (currNoticeIndex >= noticeList.length - 1) {
            $(".notice_btn-next").hide();
        }
        else {
            $(".notice_btn-next").show();
        }
    }
</script>